package com.xls.box2023.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.lzz.bottomencapsulation.holder.MvpRVViewHolder;
import com.xls.box2023.R;
import com.xls.box2023.entity.AppTeamUsersEntity;

public class TuiGuang2ItemView extends MvpRVViewHolder<AppTeamUsersEntity> {

    private TextView tg_name;
    private TextView tg_jinrishouyi;
    private TextView tg_zongshouyi;
    boolean isShowScore=true;

    public TuiGuang2ItemView(Context context, ViewGroup p) {
        super(R.layout.item_tixianjilu2, context, p);
    }

    public TuiGuang2ItemView(Context context, ViewGroup p,boolean isShowScore) {
        super(R.layout.item_tixianjilu2, context, p);
        this.isShowScore=isShowScore;
    }

    @Override
    public void initView() {
        tg_name = itemView.findViewById(R.id.tg_name);
        tg_jinrishouyi = itemView.findViewById(R.id.tg_jinrishouyi);
        tg_zongshouyi = itemView.findViewById(R.id.tg_zongshouyi);
        tg_name.setText(viewData.getUsername());
//        tg_jinrishouyi.setText("今日收益："+viewData.getScore()+" 积分");
        tg_zongshouyi.setText("总收益："+viewData.getScoreTotalStr()+" 元宝");

        if (isShowScore){
            tg_zongshouyi.setVisibility(View.VISIBLE);
        }else {
            tg_zongshouyi.setVisibility(View.INVISIBLE);
        }
    }
}
